package tests;

import static org.junit.Assert.fail;

import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

import junit.framework.Assert;

import org.junit.Test;

import Entities.Calendar;
import Entities.Course;

public class CalendarTest extends BaseExperimentSetupTest {
	public CalendarTest() throws IOException {
	}
	
	@Test
	public void testRand() {
		Calendar cal = Calendar.rand(Calendar.getHeuristic().getMaxNumberOfCourses());
		List<Course> include = cal.getCourses();
		List<Course> notInclude = cal.getRemainingCourses();
		include.addAll(notInclude);
		Assert.assertTrue(include.containsAll(BaseExperimentSetupTest.db));
	}
	
	@Test
	public void testIsBetter() {
		List<Course> l1 = new LinkedList<Course>();
		l1.add(BaseExperimentSetupTest.db.get(0));
		Calendar c1 = new Calendar(l1);
		Calendar c2 = new Calendar(BaseExperimentSetupTest.db); // should be better
		
		Assert.assertTrue(!c1.isBetter(c2));
	}

	//@Test
	public void testCalendar() {
		fail("Not yet implemented");
	}

	//@Test
	public void testGetNextAdjacentCalendar() {
		fail("Not yet implemented");
	}

	

}
